package com.mr.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import com.mr.model.BaseObject;

public interface Dao {
	   <T extends BaseObject> List<T> getAllObjects(Class<T> clazz);
	   <T extends BaseObject> T getObject(Class<T> clazz, Serializable id);
	   <T extends BaseObject> T saveObject(T entity);
	   <T extends BaseObject> T removeObject(Class<T> clazz, Serializable id);
	   <T extends BaseObject> T removeObject(T entity);
	   <T extends BaseObject> T updateObject(T entity);
	   <T extends BaseObject> T addObject(T entity);
	   <T extends BaseObject, S extends Serializable> List<T> getObjectList(Class<T> clazz, Collection<S> idList);
	   <T extends BaseObject> void removeObjectList(Collection<T> entityList);
	   <T extends BaseObject> void saveObjectList(Collection<T> entityList);
	   <T extends BaseObject> int getObjectCount(Class<T> clazz);
	   <T extends BaseObject> T removeObjectById(Class<T> clazz, Serializable id);
	   <T extends BaseObject> void addObjectList(Collection<T> entityList);
	   <T extends BaseObject> List<T> getObjectList(Class<T> clazz, String orderField, boolean asc);
	   <T extends BaseObject> Map getObjectPropertyMap(Class<T> clazz, String keyname, String valuename);
	   <T extends BaseObject> void saveObjectList(T... entityList);
	}
